package pme;

public class Subtract extends Value{
	private double currNum;
 	
	/**
	 * subtracts a Value from another
	 * 
	 * @param initVal1  original value
	 * @param initVal2  value subtracted
	 */ 
	public Subtract(Value initVal1, Value initVal2){
		if (initVal1==null) initVal1= new NullValue();
		if (initVal2==null) initVal2= new NullValue();
		
        currNum = initVal1.evaluate() - initVal2.evaluate();
	}
		
	public double evaluate(){
		return currNum;
		}

}
